<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>windenergytk.synthesis</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="windenergytk-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="windenergytk-module.html">Package&nbsp;windenergytk</a> ::
        Module&nbsp;synthesis
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="windenergytk.synthesis-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module synthesis</h1><p class="nomargin-top"><span class="codelink"><a href="windenergytk.synthesis-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="find_bin"></a><span class="summary-sig-name">find_bin</span>(<span class="summary-sig-arg">some_number</span>,
        <span class="summary-sig-arg">min</span>,
        <span class="summary-sig-arg">bins</span>,
        <span class="summary-sig-arg">value_range</span>)</span><br />
      Find the bin (index) that a number falls into.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="windenergytk.synthesis-pysrc.html#find_bin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="weighted_choice"></a><span class="summary-sig-name">weighted_choice</span>(<span class="summary-sig-arg">cumu_prob_vector</span>)</span><br />
      Returns random number (0 &lt; x &lt; 1) weighted by the probability 
      vector.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="windenergytk.synthesis-pysrc.html#weighted_choice">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="gen_arma"></a><span class="summary-sig-name">gen_arma</span>(<span class="summary-sig-arg">mean</span>,
        <span class="summary-sig-arg">stdev</span>,
        <span class="summary-sig-arg">autocor1</span>,
        <span class="summary-sig-arg">npoints</span>)</span><br />
      Normally distributed timeseries using Autoregressive Moving Average.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="windenergytk.synthesis-pysrc.html#gen_arma">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="gen_markov_tpm"></a><span class="summary-sig-name">gen_markov_tpm</span>(<span class="summary-sig-arg">tseries</span>,
        <span class="summary-sig-arg">bins</span>)</span><br />
      Generate a Markov transition probability matrix from a timeseries.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="windenergytk.synthesis-pysrc.html#gen_markov_tpm">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="gen_cumu_tpm"></a><span class="summary-sig-name">gen_cumu_tpm</span>(<span class="summary-sig-arg">tpm</span>)</span><br />
      Create cumulative transition probability matrix from regular tpm.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="windenergytk.synthesis-pysrc.html#gen_cumu_tpm">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="windenergytk.synthesis-module.html#gen_ts_from_tpm" class="summary-sig-name">gen_ts_from_tpm</a>(<span class="summary-sig-arg">tpm</span>,
        <span class="summary-sig-arg">bin_width</span>,
        <span class="summary-sig-arg">length</span>,
        <span class="summary-sig-arg">freq</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">T</code><code class="variable-quote">'</code></span>)</span><br />
      Create timeseries using a Transisiton Probability Matrix...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="windenergytk.synthesis-pysrc.html#gen_ts_from_tpm">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="windenergytk.synthesis-module.html#add_diurnal" class="summary-sig-name">add_diurnal</a>(<span class="summary-sig-arg">tseries</span>,
        <span class="summary-sig-arg">sine_period</span>,
        <span class="summary-sig-arg">peak_mag</span>)</span><br />
      Scales a time series to a sine wave of peak_mag with sine_period.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="windenergytk.synthesis-pysrc.html#add_diurnal">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="gen_pdf"></a><span class="summary-sig-name">gen_pdf</span>(<span class="summary-sig-arg">desired_mean</span>,
        <span class="summary-sig-arg">desired_stdev</span>,
        <span class="summary-sig-arg">bin_width</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="windenergytk.synthesis-pysrc.html#gen_pdf">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'windenergytk'"><code class="variable-quote">'</code><code class="variable-string">windenergytk</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="gen_ts_from_tpm"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">gen_ts_from_tpm</span>(<span class="sig-arg">tpm</span>,
        <span class="sig-arg">bin_width</span>,
        <span class="sig-arg">length</span>,
        <span class="sig-arg">freq</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">T</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="windenergytk.synthesis-pysrc.html#gen_ts_from_tpm">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Create timeseries using a Transisiton Probability Matrix
INPUT: tpm  = ndarray of n*n values
       length (int)
OUTPUT: tseries = timeseries of length

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="add_diurnal"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_diurnal</span>(<span class="sig-arg">tseries</span>,
        <span class="sig-arg">sine_period</span>,
        <span class="sig-arg">peak_mag</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="windenergytk.synthesis-pysrc.html#add_diurnal">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Scales a time series to a sine wave of peak_mag with sine_period. 
  Input: tseries, sine_period (float, hrs), peak_mag (float) Output: 
  scaled_data (array-like)</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="windenergytk-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Fri Jan 22 10:13:37 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
